home *** CD-ROM | disk | FTP | other *** search
/ Mac Magazin/MacEasy 42 / Mac Magazin and MacEasy Magazine CD - Issue 42.iso / Software / Mobiles Büro / Newton / Accordian 1.0b / ADF Folder / newton.adf < prev    next >
Text File  |  1997-02-06  |  17KB  |  443 lines

  1. // February 6, 1997
  2. // Notes Application
  3. application "paperroll" called "Notes"
  4.  
  5. // Notes Soup
  6. soup "Notes" called "Notes" of "paperroll" range "optionalDateRange"
  7.  
  8. overview "notes:date" called "By Date" of "Notes" queries "timestamp" contains
  9.     {
  10.     column "Date" width 115 is timestamp
  11.     column "Note Title" width 200 is title
  12.     }
  13.  
  14. class "paperroll" called "Note" of "Notes" contains
  15.     {
  16.     data: note called "Note" with options { "required" "automatic" }
  17.     title: string called "Title"
  18.     timestamp: datetime called "Date" default ""
  19.     viewstationery := symbol "paperroll"
  20.     height := value 200
  21.     }
  22.     
  23. class "checkList" called "Check List" of "Notes" contains
  24.     {
  25.     timestamp: datetime called "Date" default ""
  26.     title: string called "Title"
  27.     topics: array called "Topics" with options { "checklistnote" "required" } { entry called "Topic" contains
  28.             {
  29.             mtgdone: boolean called "Checked" default "O"
  30.             hideCount: integer called "Hide Count" default "0"
  31.             level: integer called "Level" default "1"
  32.             text: text called "Text" with options { "automatic" }
  33.             viewbounds := bounds { 0 0 200 30 }
  34.             }
  35.         }
  36.     viewstationery := symbol "paperroll"
  37.     height := value 200
  38.     data := nil
  39.     }
  40.     
  41. class "list" called "Outline" of "Notes" contains
  42.     {
  43.     timestamp: datetime called "Date" default ""
  44.     title: string called "Title"
  45.     topics: array called "Topics" with options { "outlinenote" "required" } { entry called "Topic" contains
  46.             {
  47.             hideCount: integer called "Hide Count" default "0"
  48.             level: integer called "Level" default "1"
  49.             text: text called "Text" with options { "automatic" }
  50.             viewbounds := bounds { 0 0 200 30 }
  51.             }
  52.         }
  53.     viewstationery := symbol "paperroll"
  54.     height := value 200
  55.     data := nil
  56.     }
  57.  
  58.  
  59. // Names Application
  60. application "cardfile" called "Names"
  61.  
  62. soup "Names" called "Names" of "cardfile" range "textRange"
  63.  
  64. overview "names:phones" called "Phone List" of { "cardfile" "Names" } queries "sortOn" contains
  65.     {
  66.     column "Name" width 150 is sortOn
  67.     column "Phone" width 117 is [ phones, 0 ]
  68.     }
  69.     
  70. overview "names:email" called "E-Mail List" of { "cardfile" "Names" } queries "sortOn" contains
  71.     {
  72.     column "Name" width 150 is sortOn
  73.     column "E-Mail" width 117 is email
  74.     }
  75.  
  76. overview "names:company" called "Company List" of { "cardfile" "Names" } queries "sortOn" contains
  77.     {
  78.     column "Name" width 150 is sortOn
  79.     column "Company" width 117 is company
  80.     }
  81.     
  82. overview "names:bday" called "Birthday List" of { "cardfile" "Names" } queries "sortOn" contains
  83.     {
  84.     column "Name" width 150 is sortOn
  85.     column "Birthday" width 117 is bday
  86.     }
  87.     
  88. class "Person" called "Person" of { "cardfile" "Names" } contains
  89.     {
  90.     sortOn := format "%s %s" { name.last name.first }
  91.     name: entry called "Name" with options { "required" } contains
  92.         {
  93.         honorific: string called "Honorific" with options { "automatic" }
  94.         first: string called "First" with options { "automatic" }
  95.         last: string called "Last" with options { "automatic" }
  96.         }
  97.         
  98.     addresses: set called "Address" firststoredin || { entry called "Address" contains
  99.             {
  100.             address: string called "Street"
  101.             address2: string called "Street"
  102.             city: string called "City"
  103.             region: string called "Region/State"
  104.             postal_code: string called "Postal Code"
  105.             country: string called "Country"
  106.             }
  107.         }
  108.     
  109.     companies: set called "Company" firststoredin || { entry called "Company" contains
  110.             {    
  111.             company: string called "Name"
  112.             title: string called "Title"
  113.             }
  114.         }
  115.         
  116.     pagers: set called "Pager" { entry called "Pager" contains
  117.             {
  118.             pagerNum: string called "Pager" class "pagerClasses" with options { "titlefromclass" "firstclasswild" }
  119.             pagerPIN: string called "Pager PIN"
  120.             }
  121.         }
  122.         
  123.     phones: set called "Phone" { string called "Phone" class "phoneClasses" with options { "titlefromclass" "firstclasswild" } }
  124.     emailAddrs: set called "E-Mail" firststoredin || { entry called "E-Mail" contains
  125.             {
  126.             email: string called "EMail" class "mailClasses" with options { "titlefromclass" "firstclasswild" }
  127.             }
  128.         }
  129.     bday: date called "Birthday"
  130.     anniversary: date called "Anniversary"
  131.     notes: note called "Notes"
  132.     cardType: integer called "Card Type"
  133.     }
  134.  
  135.  
  136. class "company" called "Company" of { "cardfile" "Names" } contains
  137.     {
  138.     sortOn := format "%s" { company }
  139.     company: string called "Company" with options { "required" }
  140.     names: set called "Name" firststoredin name { entry called "Name" contains
  141.             {
  142.             honorific: string called "Honorific"
  143.             first: string called "First Name"
  144.             last: string called "Last Name"
  145.             title: string called "Title"
  146.             }
  147.         }
  148.         
  149.     addresses: set called "Address" firststoredin || { entry called "Address" contains
  150.             {
  151.             address: string called "Street"
  152.             address2: string called "Street"
  153.             city: string called "City"
  154.             region: string called "Region"
  155.             postal_code: string called "Postal Code"
  156.             country: string called "Country"
  157.             }
  158.         }
  159.  
  160.     phones: set called "Phone" { string called "Phone" class "phoneClasses" with options { "titlefromclass" "firstclasswild" } }
  161.     emailAddrs: set called "E-Mail" firststoredin email { string called "EMail" class "mailClasses" with options { "titlefromclass" "firstclasswild" } }
  162.     notes: note called "Notes"
  163.     cardType: integer called "Card Type"
  164.     }
  165.  
  166.  
  167. class "owner" called "Owner" of { "cardfile" "Names" } with options { "nofolders" } contains
  168.     {
  169.     labels := symbol "_ownerNames"
  170.     sortOn := format "%s %s" { name.last name.first }
  171.     name: entry called "Name" with options { "required" } contains
  172.         {
  173.         honorific: string called "Honorific" with options { "automatic" } 
  174.         first: string called "First" with options { "automatic" } 
  175.         last: string called "Last" with options { "automatic" } 
  176.         }
  177.         
  178.     addresses: set called "Address" firststoredin || { entry called "Address" contains
  179.             {
  180.             address: string called "Street"
  181.             address2: string called "Street"
  182.             city: string called "City"
  183.             region: string called "Region/State"
  184.             postal_code: string called "Postal Code"
  185.             country: string called "Country"
  186.             }
  187.         }
  188.     
  189.     companies: set called "Company" firststoredin || { entry called "Company" contains
  190.             {    
  191.             company: string called "Name"
  192.             title: string called "Title"
  193.             }
  194.         }
  195.         
  196.     pagers: set called "Pager" firststoredin || { entry called "Pager" contains
  197.             {
  198.             pagerNum: string called "Pager" class "pagerClasses" with options { "titlefromclass" "firstclasswild" }
  199.             pagerPIN: string called "Pager PIN"
  200.             }
  201.         }
  202.         
  203.     phones: set called "Phone" { string called "Phone" class "phoneClasses" with options { "titlefromclass" "firstclasswild" } }
  204.     emailAddrs: set called "E-Mail" firststoredin || { entry called "E-Mail" contains
  205.             {
  206.             email: string called "EMail" class "mailClasses" with options { "titlefromclass" "firstclasswild" }
  207.             emailpassword: string called "Password"
  208.             }
  209.         }
  210.     
  211.     owner: entry called "Owner Information" contains
  212.             {
  213.             bankAccounts: set called "Bank Account" { entry called "Bank Account" contains
  214.                     {
  215.                     bankAcctNum: string called "Acct #"
  216.                     bankContactNum: string called "Phone" class "phoneClasses" with options { "titlefromclass" "firstclasswild" }
  217.                     }
  218.                 }
  219.                 
  220.             creditCards: set called "Credit Card" { entry called "Credit Card" contains
  221.                     {
  222.                     creditCardNum: string called "Card #"
  223.                     creditCardName: string called "Name" class "creditClasses" with options { "titlefromclass" "firstclasswild" }
  224.                     creditCardExpDate: date called "Exp. Date"
  225.                     creditCardContactNum: string called "Phone #"
  226.                     }
  227.             }
  228.         }
  229.         
  230.     bday: date called "Birthday"
  231.     anniversary: date called "Anniversary"
  232.     notes: note called "Notes"
  233.     cardType: integer called "Card Type"
  234.     }
  235.  
  236. class "worksite" called "Worksite" of { "cardfile" "Names" } with options { "nofolders" } contains
  237.     {
  238.     labels := symbol "_ownerNames"
  239.     sortOn:= format "%s" { place }
  240.     place: string called "Worksite" with options { "required" }
  241.     areaCode: string called "Area Code"
  242.     dialingPrefix: string called "Dialing Prefix"
  243.     notes: note called "Notes"
  244.     }
  245.     
  246. field class "creditClasses" |string.card| is "Card" ""
  247. field class "creditClasses" |string.card.phonecard| is "Phone Card" ""
  248. field class "creditClasses" |string.card.creditcard| is "Credit Card" ""
  249. field class "creditClasses" |string.card.phonecard.att| is "AT&T" ""
  250. field class "creditClasses" |string.card.phonecard.mci| is "MCI" ""
  251. field class "creditClasses" |string.card.phonecard.sprint| is "Sprint" ""
  252. field class "creditClasses" |string.card.creditcard.visa| is "VISA" ""
  253. field class "creditClasses" |string.card.creditcard.mastercard| is "MasterCard" ""
  254. field class "creditClasses" |string.card.creditcard.amex| is "AmEx" ""
  255. field class "creditClasses" |string.card.creditcard.discover| is "Discover" ""
  256.  
  257. field class "pagerClasses" |string.pager| is "Pager" ""
  258. field class "pagerClasses" |string.pager.skytel| is "SkyTel" ""
  259. field class "pagerClasses" |string.pager.mobilecomm| is "MobileComm" ""
  260. field class "pagerClasses" |string.pager.embarc| is "EMBARC" ""
  261.  
  262. field class "phoneClasses" otherPhone is "Phone" ""
  263. field class "phoneClasses" homePhone is "Home" "H"
  264. field class "phoneClasses" workPhone is "Work" "W"
  265. field class "phoneClasses" faxPhone is "Fax" "F"
  266. field class "phoneClasses" carPhone is "Car" "A"
  267. field class "phoneClasses" mobilePhone is "Cellular" "C"
  268. field class "phoneClasses" homeFaxPhone is "Home Fax" "HF"
  269.  
  270. field class "mailClasses" |string.email| is "Email" ""
  271. field class "mailClasses" |string.email.internet| is "Internet" ""
  272. field class "mailClasses" |string.email.aol| is "America Online" ""
  273. field class "mailClasses" |string.email.compuserve| is "CompuServe" ""
  274. field class "mailClasses" |string.email.mcimail| is "MCI Mail" ""
  275. field class "mailClasses" |string.email.attmail| is "AT&T Mail" ""
  276. field class "mailClasses" |string.email.easylink| is "EasyLink" ""
  277. field class "mailClasses" |string.email.prodigy| is "Prodigy" ""
  278. field class "mailClasses" |string.email.genie| is "GEnie" ""
  279. field class "mailClasses" |string.email.delphi| is "Delphi" ""
  280. field class "mailClasses" |string.email.msn| is "Network" ""
  281. field class "mailClasses" |string.email.interchange| is "Interchange" ""
  282. field class "mailClasses" |string.email.radiomail| is "RadioMail" ""
  283.  
  284.  
  285. // Calendar Application
  286. // Note that the calendar application is written using metasoups as the 
  287. // format is too complex and not really documented.
  288. application "calendar" called "Calendar" with options { "nofolders" }
  289.  
  290. // Calendar Metasoup
  291. metasoup "calendar:metasoup:REVELAR" called "Meetings" of "calendar" range "dateRange"
  292.  
  293. overview "meetings:date" called "By Date" of "calendar:metasoup:REVELAR" queries "mtgStartDate" contains
  294.     {
  295.     column "Date" width 115 is mtgStartDate
  296.     column "Description" width 200 is mtgText
  297.     }
  298.  
  299. class "meeting" called "Meeting" of "calendar:metasoup:REVELAR" contains
  300.     {
  301.     mtgStartDate: datetime called "Date" with options { "required" }
  302.     mtgText: string called "Title" with options { "required" }
  303.     mtgDuration: integer called "Duration" with options { "required" }
  304.     notes: note called "Notes"
  305.     mtgAlarm: datetime called "Alarm"
  306.     location: string called "Location" with options { "readonly" }
  307.     invitees: set called "Invitees" with options { "readonly" }
  308.         {
  309.         string called "Invitee" with options { "readonly" }
  310.         }
  311.     }
  312.     
  313. class "repeatingMeeting" called "Repeating Meeting" of "calendar:metasoup:REVELAR" contains
  314.     {
  315.     mtgStartDate: datetime called "Date" with options { "required" }
  316.     mtgText: string called "Title" with options { "required" }
  317.     mtgDuration: integer called "Duration" with options { "required" }
  318.     notes: note called "Notes"
  319.     mtgAlarm: datetime called "Alarm"
  320.     location: string called "Location" with options { "readonly" }
  321.     invitees: set called "Invitees" with options { "readonly" }
  322.         {
  323.         string called "Invitee" with options { "readonly" }
  324.         }
  325.     mtgStopDate: date called "Stop Date"
  326.     repeats: string called "Repeats" class "repeatClasses" with options { "suffixfromclass" "displayifempty" "required" }
  327.     }
  328.     
  329. class "CribNote" called "Event" of "calendar:metasoup:REVELAR" contains
  330.     {
  331.     mtgStartDate: date called "Date" with options { "required" }
  332.     mtgText: string called "Title" with options { "required" }
  333.     notes: note called "Notes"
  334.     mtgAlarm: integer called "Days Notice"
  335.     }
  336.     
  337. class "repeatingCribNote" called "Repeating Event" of "calendar:metasoup:REVELAR" contains
  338.     {
  339.     mtgStartDate: date called "Date" with options { "required" }
  340.     mtgText: string called "Title" with options { "required" }
  341.     notes: note called "Notes"
  342.     mtgStopDate: date called "Stop Date"
  343.     mtgAlarm: integer called "Days Notice"
  344.     repeats: string called "Repeats" class "repeatClasses" with options { "suffixfromclass" "displayifempty" "required" }
  345.     }
  346.     
  347. field class "repeatClasses" |daily| is "Every Day" "Every Day"
  348. field class "repeatClasses" |weekly| is "Every week" "Every week"
  349. field class "repeatClasses" |biweekly| is "Every other week" "Every other week"
  350. field class "repeatClasses" |monthly| is "Every month" "Every month"
  351. field class "repeatClasses" |monthlyByWeek| is "Same week each month" "Same week each month"
  352. field class "repeatClasses" |yearly| is "Every year" "Every year"
  353. field class "repeatClasses" |yearlyByWeek| is "Same week each year" "Same week each year"
  354. field class "repeatClasses" |other| is "Other" ""
  355.  
  356.  
  357. // To Do Application
  358. application "todo" called "To Do" with options { "nofolders" "readonly" }
  359.  
  360. // To Do Soup
  361. soup "To Do List" called "To Do List" of "todo" range "dateRange"
  362.  
  363. overview "todo:date" called "By Date" of "To Do List" queries "date" contains
  364.     {
  365.     column "Date" width 115 is date
  366.     }
  367.  
  368. class "todo" called "To Do Item" of "To Do List" with options { "readonly" } contains
  369.     {
  370.     |date|: date called "Date"
  371.     topics: set called "Items" { entry called "To Do" contains
  372.             {
  373.             mtgdone: boolean called "Completed"
  374.             mtgPriority: integer called "Priority"
  375.             text: text called "Text"
  376.             }
  377.         }
  378.     }
  379.     
  380.  
  381. range "dateRange" called "Today" is "<range> [ daystart ... daystart + 1d )"
  382. range "dateRange" called "This Week" is "<range> [ weekstart ... weekstart + 1w )"
  383. range "dateRange" called "Next Week" is "<range> [ weekstart + 1w ... weekstart + 2w )"
  384. range "dateRange" called "This Month" is "<range> [ monthstart ... monthstart + 1m )"
  385. range "dateRange" called "Next 30 Days" is "<range> [ daystart ... daystart + 30d )"
  386. range "dateRange" called "Next 60 Days" is "<range> [ daystart ... daystart + 60d )"
  387. range "dateRange" called "Next 90 Days" is "<range> [ daystart ... daystart + 90d )"
  388. range "dateRange" called "Next 120 Days" is "<range> [ daystart ... daystart + 120d )"
  389. range "dateRange" called "Next 180 Days" is "<range> [ daystart ... daystart + 180d )"
  390. range "dateRange" called "Next Year" is "<range> [ daystart ... daystart + 365d )"
  391. range "dateRange" called "Previous 30 Days" is "<range> [ daystart - 30d ... daystart )"
  392. range "dateRange" called "Previous 60 Days" is "<range> [ daystart - 60d ... daystart )"
  393. range "dateRange" called "Previous 90 Days" is "<range> [ daystart - 90d ... daystart )"
  394. range "dateRange" called "Previous 120 Days" is "<range> [ daystart - 120d ... daystart )"
  395. range "dateRange" called "Previous 180 Days" is "<range> [ daystart - 180d ... daystart )"
  396. range "optionalDateRange" called "All" is "<range> [ ... ]"
  397. range "optionalDateRange" called "Today" is "<range> [ daystart ... daystart + 1d )"
  398. range "optionalDateRange" called "This Week" is "<range> [ weekstart ... weekstart + 1w )"
  399. range "optionalDateRange" called "Next Week" is "<range> [ weekstart + 1w ... weekstart + 2w )"
  400. range "optionalDateRange" called "This Month" is "<range> [ monthstart ... monthstart + 1m )"
  401. range "optionalDateRange" called "Next 30 Days" is "<range> [ daystart ... daystart + 30d )"
  402. range "optionalDateRange" called "Next 60 Days" is "<range> [ daystart ... daystart + 60d )"
  403. range "optionalDateRange" called "Next 90 Days" is "<range> [ daystart ... daystart + 90d )"
  404. range "optionalDateRange" called "Next 120 Days" is "<range> [ daystart ... daystart + 120d )"
  405. range "optionalDateRange" called "Next 180 Days" is "<range> [ daystart ... daystart + 180d )"
  406. range "optionalDateRange" called "Next Year" is "<range> [ daystart ... daystart + 365d )"
  407. range "optionalDateRange" called "Previous 30 Days" is "<range> [ daystart - 30d ... daystart )"
  408. range "optionalDateRange" called "Previous 60 Days" is "<range> [ daystart - 60d ... daystart )"
  409. range "optionalDateRange" called "Previous 90 Days" is "<range> [ daystart - 90d ... daystart )"
  410. range "optionalDateRange" called "Previous 120 Days" is "<range> [ daystart - 120d ... daystart )"
  411. range "optionalDateRange" called "Previous 180 Days" is "<range> [ daystart - 180d ... daystart )"
  412.  
  413. range "textRange" called "All" is "<range> [ ... ]"
  414. range "textRange" called "#..D" is "<range> [ ... \"E\" )"
  415. range "textRange" called "E..H" is "<range> [ \"E\" ... \"I\" )"
  416. range "textRange" called "I..L" is "<range> [ \"I\" ... \"M\" )"
  417. range "textRange" called "M..P" is "<range> [ \"M\" ... \"Q\" )"
  418. range "textRange" called "Q..T" is "<range> [ \"Q\" ... \"U\" )"
  419. range "textRange" called "U..X" is "<range> [ \"U\" ... \"Y\" )"
  420. range "textRange" called "Y..Z" is "<range> [ \"Y\" ... ]"
  421.  
  422. // Calls Application
  423. application "callapp" called "Calls" with options { "readonly" }
  424.  
  425. // Calls Soup
  426. soup "Calls" called "Calls" of "callapp"
  427.  
  428. overview "calls:date" called "By Date" of "Calls" queries "timestamp" 
  429. contains
  430.     {
  431.     column "Date" width 115 is timestamp
  432.     column "Title" width 150 is title
  433.     }
  434.     
  435. class "calllog" called "Call" of "Calls" contains
  436.     {
  437.     timestamp: datetime called "Date"
  438.     title: string called "Title"
  439.     name: string called "Name"
  440.     phoneNumber: string called "Number"
  441.     notes: note called "History"
  442.     }
  443.